import request from './request'

// 新增公司
export const companyAdd = (company) => {
  return request({
    url: '/company/add',
    method: 'post',
    data: company,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 公司列表
export const companyList = (params) => {
  return request({
    url: '/company/list',
    method: 'get',
    param: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 公司详情
export const companyDetail = (companyId) => {
  return request({
    url: '/company/detail',
    method: 'get',
    param: { companyId },
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 删除用户
export const companyDelete = (companyId) => {
  return request({
    url: '/company/delete',
    method: 'get',
    param: { companyId },
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 修改公司
export const companyUpdate = (company) => {
  return request({
    url: '/company/update',
    method: 'post',
    data: company,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 公司信息
export const companyInfo = () => {
  return request({
    url: '/company/info',
    method: 'get',
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}
